home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / EnterAct 3.5 / Drag_on Modules / hAWK programs / $FileSizes < prev    next >
Encoding:
Text File  |  1992-12-13  |  405 b   |  15 lines  |  [TEXT/KEEN]

  1. # $FileSizes : print name of file and size of data fork in bytes,
  2. # followed by totals.
  3. # Typically use the "MFS selected files" input option, and "Show stdout".
  4.  
  5. BEGIN {
  6.     for (i = 1; i < ARGC; ++i)#note ARGV[0] is just "hAWK"
  7.         {
  8.         n = split(ARGV[i], names, ":")
  9.         curSize = fsize(ARGV[i])
  10.         print names[n], "\t\t\t", curSize
  11.         totSize += curSize
  12.         }
  13.     print ARGC-1, "files, ", totSize, "bytes total."
  14.     }
  15.